home *** CD-ROM | disk | FTP | other *** search
/ Nautilus 1992 July / Nautilus-3-8 / Nautilus-3-8.bin / Tools & Utilities / Techy Stuff / Doco ƒ / CSMP ƒ / CSMP-V1-077.TXT < prev    next >
Encoding:
Text File  |  1992-06-04  |  56.7 KB  |  1,552 lines

  1. C.S.M.P. Digest             Mon, 11 May 92       Volume 1 : Issue 77
  2.  
  3. Today's Topics:
  4.  
  5.     application error messages
  6.     232KBaud serial rate on Mac
  7.     Notification alerts kills the foreground application...
  8.     What is an 'scod' resource?
  9.     developing for mac ?
  10.     PPC Programming
  11.     MMU dcmd??
  12.     Notification color icons
  13.     Appletalk printing problems
  14.     Extra QD Text Styles - how??
  15.     BalloonWriter
  16.     Playing non-MIDI frequencies
  17.  
  18.  
  19. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  20.  
  21. These digests are available (by using FTP, account anonymous, your email
  22. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  23. edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
  24. Questions list.  The last several issues of the digest are available from
  25. sumex-aim.stanford.edu as well.
  26.  
  27. These digests are also available via email.  Just send a note saying that you
  28. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  29. automatically receive each new digest as it is created.
  30.  
  31. The digest is a collection of articles from the internet newsgroup comp.sys.
  32. mac.programmer.  It is designed for people who read c.s.m.p. semi-regularly
  33. and want an archive of the discussions.  If you don't know what a newsgroup
  34. is, you probably don't have access to it.  Ask your systems administrator(s)
  35. for details.  (This means you can't post questions to the digest.)
  36.  
  37. The articles in these digests are taken directly from comp.sys.mac.programmer.
  38. They are not edited; all articles included in this digest are in their original
  39. posted form.  The only articles that are -not- included in these digests are
  40. those which didn't receive any replies (except those that give information
  41. rather than ask a question).  All replies to each article are concatenated
  42. onto the original article in the order in which they were received.  Article
  43. threads are not added to the digests until the last article added to the
  44. thread is at least one month old (this is to ensure that the thread is dead
  45. before adding it to the digests).
  46.  
  47. Send administrative mail to mkelly@cs.uoregon.edu.
  48.  
  49. -------------------------------------------------------
  50.  
  51. From: duncan@convex.csd.uwm.edu (Shan D Duncan)
  52. Subject: application error messages
  53. Date: 9 Apr 92 15:46:09 GMT
  54. Organization: University of Wisconsin - Milwaukee
  55.  
  56.  
  57. Is there a list of the very informative error message the Mac
  58. sometimes hands out?
  59.  
  60. For example when using MS word - the application will quit and
  61. the message   application suddenly quite type 2 error.
  62.  
  63.  
  64.        Looking in the system manual that came with our Si - it
  65. mentions to make a note of the error number - but I can not find
  66. a listing of them.  
  67.  
  68.  
  69. Is there a complete list?  
  70.  
  71.  
  72. - -Thanks
  73.  
  74. +++++++++++++++++++++++++++
  75.  
  76. From: zobkiw@world.std.com (Joe Zobkiw)
  77. Date: 9 Apr 92 20:16:50 GMT
  78. Organization: The World Public Access UNIX, Brookline, MA
  79.  
  80. System Errors DA (ie: Display DA) contains a list of all error codes.
  81.  
  82.  
  83. - -- 
  84. <--------------------------------------------------->
  85.  joe zobkiw                     zobkiw@world.std.com
  86.  mac.synthesis.MIDI.development.C.asm.communications
  87. >---------------------------------------------------<
  88.  
  89. ---------------------------
  90.  
  91. From: green@eniac.seas.upenn.edu (Bradley Green )
  92. Subject: 232KBaud serial rate on Mac
  93. Date: 9 Apr 92 18:11:32 GMT
  94. Organization: University of Pennsylvania
  95.  
  96. OK, I'll try you guys again.  Does anybody out there know how to get
  97. speeds > 35KBaud out of the Mac serial interface without using AppleTalk?
  98. A code sample or good reference book would be great - IA doesn't have
  99. much of use.
  100.  
  101. Several people have written to me to see if I got any respose, so the 
  102. interest is out there
  103.  
  104. Brad
  105.  
  106. +++++++++++++++++++++++++++
  107.  
  108. From: sje@xylos.ma30.bull.com (Steven J. Edwards)
  109. Date: 9 Apr 92 21:49:34 GMT
  110. Organization: Bull HN, Worldwide Information Systems, Billerica, Mass., USA
  111.  
  112. In article <73458@netnews.upenn.edu> green@eniac.seas.upenn.edu (Bradley Green ) writes:
  113. > OK, I'll try you guys again.  Does anybody out there know how to get
  114. > speeds > 35KBaud out of the Mac serial interface without using AppleTalk?
  115. > A code sample or good reference book would be great - IA doesn't have
  116. > much of use.
  117. >
  118. > Several people have written to me to see if I got any respose, so the 
  119. > interest is out there
  120.  
  121.     I use the commercial utility LapLinkMac (Travelling Software)
  122. to set up a 115200 baud link from a Mac Plus to a PC clone, so it is
  123. possible to exceed the normal Mac limits without using AppleTalk.  The
  124. quality of the transfer is very good.  Perhaps you might buy a copy
  125. and ask their tech support how it's done.
  126.  
  127.     I suspect that the PC side of LLM involves reprogramming the
  128. UART or some similar low level trickery because the PC is not
  129. necessarially restored to its default state after a transfer.  Perhaps
  130. LLM on the Mac side reprograms the Zilog SCC?  The later Mac models
  131. may have different low level feature access protocol because of
  132. greater VLSI and ASIC usage.
  133.  
  134.     The very early (1984) hard drives were accessed via a serial
  135. port and I think that they also ran faster than 57600 baud.
  136.  
  137.  [The above opinions expressed are my own; not necessarily held by others.]
  138.       == Steven J. Edwards           Bull HN Information Systems Inc. ==
  139.       == (508) 294-3484              300 Concord Road         MS 820A ==
  140.       == sje@xylos.ma30.bull.com     Billerica, MA 01821          USA ==
  141. "That Government which Governs the Least, Governs Best." -- Thomas Jefferson
  142.  
  143. +++++++++++++++++++++++++++
  144.  
  145. From: jcav@quads.uchicago.edu (JohnC)
  146. Date: 9 Apr 92 20:13:45 GMT
  147. Organization: The Royal Society for Putting Things on Top of Other Things
  148.  
  149. In article <73458@netnews.upenn.edu> green@eniac.seas.upenn.edu (Bradley Green ) writes:
  150. >OK, I'll try you guys again.  Does anybody out there know how to get
  151. >speeds > 35KBaud out of the Mac serial interface without using AppleTalk?
  152. >A code sample or good reference book would be great - IA doesn't have
  153. >much of use.
  154.  
  155. The standard serial drivers will go up to 57K baud. 
  156.  
  157. - -- 
  158. John Cavallino                  |  EMail: jcav@midway.uchicago.edu
  159. University of Chicago Hospitals |         John_Cavallino@uchfm.bsd.uchicago.edu
  160. Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
  161. B0 f++ c+ g+ k s++ e+ h- pv     |         Chicago, IL  60637
  162.  
  163. ---------------------------
  164.  
  165. From: sundinKC@dna.lth.se (Anders Sundin)
  166. Subject: Notification alerts kills the foreground application...
  167. Date: 24 Mar 92 11:50:13 GMT
  168. Organization: Organic Chemistry 2, Lund University, Sweden
  169.  
  170. I find it very irritating that alert notifications still are
  171. "owned" by the foreground application. This means that the
  172. foreground application STOPS...
  173.  
  174. It does not make me happy when I find that the number crunching
  175. application I left in the foreground over the weekend stopped
  176. at Friday 6.00 PM because I got a notification alert from somewhere.
  177.  
  178. Irony Alert!
  179. I suppose I should be happy that the foreground application was not
  180. controlling a chemical plant or a heart-lung machine at a hospital.
  181. I guess that such things should be done on a PC instead.
  182. End irony alert!
  183. - -- 
  184.  Anders Sundin           e-mail: sundinKC@dna.lth.se
  185.  Organic Chemistry 2             Anders.Sundin@orgk2.lth.se
  186.  University of Lund              ok2aps@gemini.ldc.lu.se
  187.  P.O. Box 124                    ok2aps@seldc52.bitnet
  188.  S-22100 Lund            phone:  +46 46 108214
  189.  Sweden                  fax:    +46 46 108209
  190.  
  191. +++++++++++++++++++++++++++
  192.  
  193. From: DN5@psuvm.psu.edu (D. Jay Newman)
  194. Date: 24 Mar 92 14:00:58 GMT
  195. Organization: Penn State University
  196.  
  197. In article <1992Mar24.115013.4553@lth.se>, sundinKC@dna.lth.se (Anders Sundin)
  198. says:
  199.  
  200. >I find it very irritating that alert notifications still are
  201. >"owned" by the foreground application. This means that the
  202. >foreground application STOPS...
  203.  
  204. I fully agree!  I use PopMail II, and this is my major complaint.  I
  205. just wish that people would use the "flashing icon" style alert (when
  206. the icon in the menubar starts flashing, then you know you should go
  207. and do something about it -- it doesn't stop the top process!
  208.  
  209. I have had an overnight backup stopped right after I left, because I
  210. forgot to quit PopMail and some new mail arrived.
  211.  
  212. I really shouldn't have an application stopped -- even a background
  213. application, but especially not the foreground one -- just because
  214. somebody wants to tell me something!
  215.  
  216. ()()()()()()()()()()()()() CBEL--Teaching & Learning Technologies ()()()
  217. D. Jay Newman     !            Have you ever wondered who
  218. dn5@psuvm         !            Caspar the Friendly Ghost
  219. dn5@psuvm.psu.edu !            was when he was alive?
  220.  
  221. +++++++++++++++++++++++++++
  222.  
  223. From: damurphy@wc.novell.com (Duane A Murphy)
  224. Organization: Novell, Inc. - Walnut Creek
  225. Date: Tue, 24 Mar 1992 16:41:59 GMT
  226.  
  227. In article <92084.090058DN5@psuvm.psu.edu> DN5@psuvm.psu.edu (D. Jay Newman) writes:
  228. >In article <1992Mar24.115013.4553@lth.se>, sundinKC@dna.lth.se (Anders Sundin)
  229. >says:
  230. >
  231. >>I find it very irritating that alert notifications still are
  232. >>"owned" by the foreground application. This means that the
  233. >>foreground application STOPS...
  234. >
  235. >I fully agree!  I use PopMail II, and this is my major complaint.  I
  236. >just wish that people would use the "flashing icon" style alert (when
  237. >the icon in the menubar starts flashing, then you know you should go
  238. >and do something about it -- it doesn't stop the top process!
  239. >
  240.  
  241. I too find this especially annoying.  But I dont think that it is the 
  242. Notification Managers fault.  I place the blame on the applications.
  243. The Notification Manager provides three types of notification that are 
  244. easily changed from within the application.  It is a simple matter
  245. to provide preferences for the notification.  If you dont mind the
  246. alerts (which I dispise) then you could use those.  You can also use
  247. "Polite notification" (the flashing icon).
  248.  
  249. Applications need to use the features that are available and give
  250. users access to set them the way that they like.
  251.  
  252. Duane Murphy
  253. My opinions are just that _MY_ opinions.
  254.  
  255.  
  256. +++++++++++++++++++++++++++
  257.  
  258. From: d88-jwa@iswed.nada.kth.se (Jon W{tte)
  259. Date: 25 Mar 92 12:39:47 GMT
  260. Organization: Royal Institute of Technology, Stockholm, Sweden
  261.  
  262. .edu> DN5@psuvm.psu.edu (D. Jay Newman) writes:
  263.  
  264.    I fully agree!  I use PopMail II, and this is my major complaint.  I
  265.    just wish that people would use the "flashing icon" style alert (when
  266.    the icon in the menubar starts flashing, then you know you should go
  267.    and do something about it -- it doesn't stop the top process!
  268.  
  269. Any conformant application written according to the rules
  270. lets you set the notification level you want; diamond,
  271. diamond&icon, or diamond,icon and alert.
  272.  
  273. If it doesn't, it's just as bad as software locking
  274. handles by settin gthe high bit of the master pointer.
  275.  
  276. - -- 
  277. h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
  278.  
  279. +++++++++++++++++++++++++++
  280.  
  281. From: sundinKC@dna.lth.se (Anders Sundin)
  282. Date: 25 Mar 92 16:39:07 GMT
  283. Organization: Organic Chemistry 2, Lund University, Sweden
  284.  
  285. Jon W{tte writes:
  286. > Any conformant application written according to the rules
  287. > lets you set the notification level you want; diamond,
  288. > diamond&icon, or diamond,icon and alert.
  289.  
  290. Yes, thats is all very well. However, it is not enough.
  291. I don't want to check that every notification alert in
  292. every application, control panel, etc. is turned off
  293. before I start an important and time-consuming job.
  294. And how do I know I found them all?
  295.  
  296. Our department has built a peptide-synthesis machine that is
  297. controlled by a Macintosh Plus. If that computer stopped because
  298. of a notification alert then it could cost us thousands of dollars.
  299. Currently we use System Software version 3.2 to be safe from any
  300. unwanted notification alerts.
  301.  
  302. I run molecular mechanics programs (MM2(91) and MM3) and I also use
  303. semiempirical quantum mechanics (MOPAC) on my Macintosh IIfx.
  304. These programs are takes many hours or days to complete and they are
  305. always in danger of being stopped by a notification alert.
  306. I usually remember to turn off notification alerts in MacPost
  307. and to put the Finder in front before I leave for home...
  308.  
  309. - -- 
  310.  Anders Sundin           e-mail: sundinKC@dna.lth.se
  311.  Organic Chemistry 2             Anders.Sundin@orgk2.lth.se
  312.  University of Lund              ok2aps@gemini.ldc.lu.se
  313.  P.O. Box 124                    ok2aps@seldc52.bitnet
  314.  S-22100 Lund            phone:  +46 46 108214
  315.  Sweden                  fax:    +46 46 108209
  316.  
  317. +++++++++++++++++++++++++++
  318.  
  319. From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
  320. Date: 25 Mar 92 20:45:35 GMT
  321. Organization: Royal Institute of Technology, Stockholm, Sweden
  322.  
  323. .se> sundinKC@dna.lth.se (Anders Sundin) writes:
  324.  
  325.    > Any conformant application written according to the rules
  326.    > lets you set the notification level you want; diamond,
  327.    > diamond&icon, or diamond,icon and alert.
  328.  
  329.    Yes, thats is all very well. However, it is not enough.
  330.    I don't want to check that every notification alert in
  331.    every application, control panel, etc. is turned off
  332.    before I start an important and time-consuming job.
  333.    And how do I know I found them all?
  334.  
  335. Ah, but then the default should be level 2 (i.e. icon and diamond)
  336.  
  337. If you REALLY want to, why not patch NmInstall to remove any alert
  338. strings it might have attached ? :-)
  339.  
  340. - -- 
  341. h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
  342.  
  343. +++++++++++++++++++++++++++
  344.  
  345. From: sundinKC@dna.lth.se (Anders Sundin)
  346. Date: 26 Mar 92 10:06:38 GMT
  347. Organization: Organic Chemistry 2, Lund University, Sweden
  348.  
  349. Jon W{tte writes:
  350. > Ah, but then the default should be level 2 (i.e. icon and diamond)
  351. > If you REALLY want to, why not patch NmInstall to remove any alert
  352. > strings it might have attached ? :-)
  353.  
  354.  
  355. Yes I agree. To use the Macintosh for scientific calculations or
  356. as a controller for instruments I will have to patch NmInstall.
  357. Maybe Apple will write a new TN on this subject. ;-)
  358. "How to avoid getting hit by a drunk and drive notification.".
  359. - -- 
  360.  Anders Sundin           e-mail: sundinKC@dna.lth.se
  361.  Organic Chemistry 2             Anders.Sundin@orgk2.lth.se
  362.  University of Lund              ok2aps@gemini.ldc.lu.se
  363.  P.O. Box 124                    ok2aps@seldc52.bitnet
  364.  S-22100 Lund            phone:  +46 46 108214
  365.  Sweden                  fax:    +46 46 108209
  366.  
  367. +++++++++++++++++++++++++++
  368.  
  369. From: dorner@pequod.cso.uiuc.edu (Steve Dorner)
  370. Organization: University of Illinois at Urbana-Champaign
  371. Date: Thu, 26 Mar 1992 21:50:52 GMT
  372.  
  373. D. Jay Newman <DN5@psuvm.psu.edu> writes:
  374. >I fully agree!  I use PopMail II, and this is my major complaint.  I
  375. >just wish that people would use the "flashing icon" style alert (when
  376. >the icon in the menubar starts flashing, then you know you should go
  377. >and do something about it -- it doesn't stop the top process!
  378.  
  379. Eudora allows you to specify that they go away after a certain amount of
  380. time.
  381.  
  382. I agree with the original point; the Notification Manager is EXTREMELY
  383. obnoxious.  No doubt this is so that it can survive whatever screwy state
  384. the frontmost application might be in, and still do its job.  However, it
  385. sure would be nice if something could be done about it.
  386.  
  387. - -- 
  388. Steve Dorner, U of Illinois Computing Services Office
  389. Internet: s-dorner@uiuc.edu  UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
  390.  
  391. +++++++++++++++++++++++++++
  392.  
  393. From: time@ice.com (Tim Endres)
  394. Date: 27 Mar 92 15:10:54 GMT
  395. Organization: ICE Engineering, Inc.
  396.  
  397.  
  398. In article <D88-JWA.92Mar25214535@hemul.nada.kth.se> (comp.sys.mac.programmer), d88-jwa@hemul.nada.kth.se (Jon W{tte) writes:
  399. > Ah, but then the default should be level 2 (i.e. icon and diamond)
  400. > If you REALLY want to, why not patch NmInstall to remove any alert
  401. > strings it might have attached ? :-)
  402.  
  403. Fear not brave soldiers! My Control Panel for doing this is just about
  404. ready for release. It will take those nasty notifies with strings,
  405. and copy the strings into the Control Panel's list, then just do the
  406. icon and mark (i.e. removes the string)!
  407.  
  408. Give me the weekend and I will put it up for ftp.
  409.  
  410. tim.
  411.  
  412.  
  413. tim endres - time@ice.com  -or-  uupsi!tbomb!time
  414. ICE Engineering, Inc. - Phone (313) 449 8288 - FAX (313) 449-9208
  415. 8840 Main Street, Whitmore Lake, MI  48189
  416. USENET - a slow moving self parody... ph
  417.  
  418. +++++++++++++++++++++++++++
  419.  
  420. From: time@ice.com (Tim Endres)
  421. Date: 27 Mar 92 15:10:54 GMT
  422. Organization: ICE Engineering, Inc.
  423.  
  424.  
  425. In article <D88-JWA.92Mar25214535@hemul.nada.kth.se> (comp.sys.mac.programmer), d88-jwa@hemul.nada.kth.se (Jon W{tte) writes:
  426. > Ah, but then the default should be level 2 (i.e. icon and diamond)
  427. > If you REALLY want to, why not patch NmInstall to remove any alert
  428. > strings it might have attached ? :-)
  429.  
  430. Fear not brave soldiers! My Control Panel for doing this is just about
  431. ready for release. It will take those nasty notifies with strings,
  432. and copy the strings into the Control Panel's list, then just do the
  433. icon and mark (i.e. removes the string)!
  434.  
  435. Give me the weekend and I will put it up for ftp.
  436.  
  437. tim.
  438.  
  439.  
  440. tim endres - time@ice.com  -or-  uupsi!tbomb!time
  441. ICE Engineering, Inc. - Phone (313) 449 8288 - FAX (313) 449-9208
  442. 8840 Main Street, Whitmore Lake, MI  48189
  443. USENET - a slow moving self parody... ph
  444.  
  445. +++++++++++++++++++++++++++
  446.  
  447. From: cory@howtek.UUCP (Cory Kempf)
  448. Date: 9 Apr 92 17:10:50 GMT
  449. Organization: Howtek, Inc.  Hudson, New Hampshire
  450.  
  451.  
  452. In article <1CE00001.vh99e3@tbomb.ice.com> (comp.sys.mac.programmer), time@ice.com (Tim Endres) writes:
  453. >In article <D88-JWA.92Mar25214535@hemul.nada.kth.se> (comp.sys.mac.programmer), d88-jwa@hemul.nada.kth.se (Jon W{tte) writes:
  454. >> If you REALLY want to, why not patch NmInstall to remove any alert
  455. >> strings it might have attached ? :-)
  456. >
  457. >Fear not brave soldiers! My Control Panel for doing this is just about
  458. >ready for release. It will take those nasty notifies with strings,
  459. >and copy the strings into the Control Panel's list, then just do the
  460. >icon and mark (i.e. removes the string)!
  461. >
  462. >Give me the weekend and I will put it up for ftp.
  463.  
  464. And there will be much rejoicing!!!!!!!!!!!!!!!!
  465.  
  466. Do you know if it would be able to deal with AppleShare volumes going
  467. away?  Or spurious DiskInit alerts?  
  468.  
  469. A real obnoxious problem that I have been having with uAccess (though
  470. by no means the fault of uAccess) is when I leave for the night, my
  471. file server often decides to go away, bringing up an alert that seems
  472. to stop the Mac, or (if I forget to put a disk in the CD Drive), I
  473. get an alert asking me if I want to initialize the disk in the CD
  474. drive.
  475.  
  476. +C
  477.  
  478.  
  479. - ---------------------------------------------------------------
  480. Cory Kempf                  domain: cory@howtek.uucp
  481. Howtek, Inc.            bang: decvax!fasfax!howtek!cory
  482. Remember: Never play russian roulette with a semi-automatic.
  483.  
  484. ---------------------------
  485.  
  486. Organization: Queen's University at Kingston
  487. Date: Friday, 27 Mar 1992 23:25:10 EST
  488. From: <CHARLESW@QUCDN.QueensU.CA>
  489. Subject: What is an 'scod' resource?
  490.  
  491.   Can someone point me to information on what an 'scod' resource is?
  492. (I'm getting locked up there in a "very large" loop waiting for something.)
  493.  
  494.   Thanks,
  495.  
  496. .../dave   Dave Charlesworth
  497.  
  498. +++++++++++++++++++++++++++
  499.  
  500. From: cory@enigami.mv.com (Cory Kempf)
  501. Date: Tue, 31 Mar 92 18:44:24 EST
  502. Organization: EnigamI, Inc., Nashua, NH
  503.  
  504.  
  505. In article <92087.232510CHARLESW@QUCDN.QueensU.CA> (comp.sys.mac.programmer), <CHARLESW@QUCDN.QueensU.CA> writes:
  506. >  Can someone point me to information on what an 'scod' resource is?
  507. >(I'm getting locked up there in a "very large" loop waiting for something.)
  508.  
  509. Multifinder.  Under System 7.
  510.  
  511. +C
  512.  
  513.  
  514. - -------------------------------------------------------------
  515. Cory Kempf                    EnigamI, Inc.
  516. cory@enigami.mv.com           ...!decvax!enigami!cory
  517. Never play Russian Roulette with a semi-automatic.
  518.  
  519. +++++++++++++++++++++++++++
  520.  
  521. From: REEKES@applelink.apple.com (Jim Reekes)
  522. Date: 9 Apr 92 20:01:15 GMT
  523. Organization: Apple Computer, Inc.
  524.  
  525. In article <92087.232510CHARLESW@QUCDN.QueensU.CA>, CHARLESW@QUCDN.QueensU.CA writes:
  526. >   Can someone point me to information on what an 'scod' resource is?
  527. > (I'm getting locked up there in a "very large" loop waiting for something.)
  528. >   Thanks,
  529. > ..../dave   Dave Charlesworth
  530.  
  531. It's one of the Process Manager's code segements.  The Process Manager is
  532. actually an application.  It has all of the normal things a standard app
  533. would have including the code segments, a jump table, QuickDraw globals,
  534. A5 globals, etc.  All of the code segments have been given a special type,
  535. 'scod'.  You'll even notice patches to GetResource that will replace 'CODE'
  536. with 'scod' to allow the LoadSeg trap to work with the Process Manager's code.
  537.  
  538. Jim
  539.  
  540. ---------------------------
  541.  
  542. From: mlindholm@cc.helsinki.fi
  543. Subject: developing for mac ?
  544. Date: 31 Mar 92 19:22:37 GMT
  545. Organization: University of Helsinki
  546.  
  547.  
  548.     I'd like to get information of development
  549.     environments which produce code both for 
  550.     Macintosh and DOS or Windows.  So I have to 
  551.     write the code only once.
  552.  
  553.     Thanks in advance.
  554.  
  555.                         mlindholm@cc.helsinki.fi
  556.  
  557. +++++++++++++++++++++++++++
  558.  
  559. From: ksand@apple.com (Kent Sandvik)
  560. Date: 8 Apr 92 23:19:17 GMT
  561. Organization: MacDTS Mongols
  562.  
  563. In article <1992Mar31.212237.1@cc.helsinki.fi>, mlindholm@cc.helsinki.fi writes:
  564. >     I'd like to get information of development
  565. >     environments which produce code both for 
  566. >     Macintosh and DOS or Windows.  So I have to 
  567. >     write the code only once.
  568. >     Thanks in advance.
  569. >                         mlindholm@cc.helsinki.fi
  570.  
  571. SmallTalk/V, xvt, Universal Component system, a lot of other
  572. rumored frameworks here real soon now.
  573.  
  574. Cheers,
  575. Kent
  576.  
  577. - --
  578. Kent Sandvik/DTS - Dynamic Language Evangelist.
  579. Opinions expressed are not private, and not owned by any company, 
  580. organization or group. Happy happy, joy joy!
  581.  
  582. ---------------------------
  583.  
  584. From: camrose@cs.mcgill.ca ()
  585. Subject: PPC Programming
  586. Organization: SOCS, McGill University, Montreal, Canada
  587. Date: Sat, 28 Mar 1992 20:50:35 GMT
  588.  
  589.  
  590.  
  591. Does anyone out there have any experience with the PPC Toolbox? I am
  592. currently in the midst of writing an application that needs to utilize
  593. this Mac feature.  It seems as though this is pretty virgin ground
  594. judging by the amount of literature on it -- or am I missing something?
  595. (Very, very possible!!!!)  If anyone can answer some questions for me or
  596. direct me in the direction of some literature, I would be more than
  597. grateful.
  598.  
  599.  
  600.                 Jason Vantomme
  601.                   
  602.  
  603.  
  604.  
  605. +++++++++++++++++++++++++++
  606.  
  607. From: ksand@apple.com (Kent Sandvik)
  608. Date: 9 Apr 92 01:48:25 GMT
  609. Organization: MacDTS Mongols
  610.  
  611. In article <1992Mar28.205035.20240@cs.mcgill.ca>, camrose@cs.mcgill.ca writes:
  612. > Does anyone out there have any experience with the PPC Toolbox? I am
  613. > currently in the midst of writing an application that needs to utilize
  614. > this Mac feature.  It seems as though this is pretty virgin ground
  615. > judging by the amount of literature on it -- or am I missing something?
  616. > (Very, very possible!!!!)  If anyone can answer some questions for me or
  617. > direct me in the direction of some literature, I would be more than
  618. > grateful.
  619.  
  620. IM VI should cover a lot of ground - also check out Kibitz, a DTS
  621. sample that has a lot of PPC code which could be re-cycled.
  622.  
  623. Cheers,
  624. Kent Sandvik, Dynamic Language Propagandist
  625.  
  626. ---------------------------
  627.  
  628. From: neal@farallon.com (Neal Trautman)
  629. Subject: MMU dcmd??
  630. Date: 31 Mar 92 20:56:38 GMT
  631. Organization: Farallon Computing, Inc.
  632.  
  633. Anyone have a dcmd, for MacsBug or TMON Pro,
  634. that will allow me to manipulate the MMU and
  635. "write-protect" an area of memory??
  636.  
  637. I need to figure out who's writing garbage on top
  638. of my CODE resources.
  639.  
  640. Neal Trautman
  641. Timbuktu Lead Software Engineer
  642. Farallon Computing, Inc.
  643. neal@farallon.com
  644.  
  645. +++++++++++++++++++++++++++
  646.  
  647. From: ksand@apple.com (Kent Sandvik)
  648. Date: 9 Apr 92 02:50:20 GMT
  649. Organization: MacDTS Mongols
  650.  
  651. In article <249@farallonfarallon.com>, neal@farallon.com (Neal Trautman) writes:
  652. > Anyone have a dcmd, for MacsBug or TMON Pro,
  653. > that will allow me to manipulate the MMU and
  654. > "write-protect" an area of memory??
  655.  
  656. > I need to figure out who's writing garbage on top
  657. > of my CODE resources.
  658.  
  659. SADE 1.4a1, on ETO#6, has memory address MMU protection
  660. (heh, something good with SADE...).
  661.  
  662. Cheers,
  663. Kent Sandvik, Dynamic Language Prophet
  664.  
  665. ---------------------------
  666.  
  667. From: piovanel@ghost.dsi.unimi.it (marco piovanelli)
  668. Subject: Notification color icons
  669. Organization: Computer Science Dep. - Milan University
  670. Date: Wed, 8 Apr 1992 11:48:27 GMT
  671.  
  672. I have a small application that can work in background to process
  673. apple events, and sometimes needs to interact with the user.
  674. If it's in the bg, it posts a polite notification request by calling
  675. AEInteractWithUser with a NIL parameter.  IM 6 says this will default
  676. to a standard behavior.  Yet, what I get is a flashing SICN in the
  677. menubar (the SICN resource has the same ID as the ID of the application's
  678. icon family).  I would like to get a color icon (i.e. ics8 or ics4) used
  679. instead, at least on a color screen.
  680.   Now: IM 6 says I should put in the nmIcon field of a NM request record
  681.   a *HANDLE TO AN ICON FAMILY*.  What does this mean exactly?
  682.   Should I pass a handle to an ics8 resource, for example?
  683.   How could the Notification Manager tell a handle to a SICN from a
  684.   handle to a resource of a different kind?
  685.  
  686.   Thanx in advance for any hints on this issue.
  687.  
  688.  
  689. +++++++++++++++++++++++++++
  690.  
  691. From: leonardr@ccs.itd.umich.edu
  692. Date: 9 Apr 92 17:29:09 GMT
  693. Organization: Campus Computing Sites, University of Michigan-Ann Arbor
  694.  
  695. In article <1992Apr8.114827.1815@ghost.dsi.unimi.it> piovanel@ghost.dsi.unimi.it (marco piovanelli) writes:
  696. >I have a small application that can work in background to process
  697. >apple events, and sometimes needs to interact with the user.
  698. >If it's in the bg, it posts a polite notification request by calling
  699. >AEInteractWithUser with a NIL parameter.  IM 6 says this will default
  700. >to a standard behavior.  Yet, what I get is a flashing SICN in the
  701. >menubar (the SICN resource has the same ID as the ID of the application's
  702. >icon family).  I would like to get a color icon (i.e. ics8 or ics4) used
  703. >instead, at least on a color screen.
  704. >  Now: IM 6 says I should put in the nmIcon field of a NM request record
  705. >  a *HANDLE TO AN ICON FAMILY*.  What does this mean exactly?
  706. >  Should I pass a handle to an ics8 resource, for example?
  707. >  How could the Notification Manager tell a handle to a SICN from a
  708. >  handle to a resource of a different kind?
  709. >
  710.     An IconFamily, is an "as yet undocumented" data structure which is 
  711. part of the also "as yet undocumented" Icon Manager, which is the part of 
  712. System 7 that the Finder, Chooser, Notification Manager, etc. use to draw
  713. the appropriate icons.
  714.  
  715.     MacDTS is preparing (has already released??) a Tech Note which
  716. documents some of the parts of the Icon Manager, but I don't know if that
  717. includes the info for creating & disposing IconFamilies.
  718.  
  719.  
  720. - -- 
  721. - -----------------------------------------------------------------------
  722. Leonard Rosenthol          Internet: leonardr@ccs.itd.umich.edu
  723. Director of Advanced Technology   AppleLink: MACgician
  724. Aladdin Systems, inc.          GEnie:     MACgician
  725.  
  726. +++++++++++++++++++++++++++
  727.  
  728. From: wombat@claris.com (Scott Lindsey)
  729. Date: 9 Apr 92 21:19:39 GMT
  730. Organization: Claris Corporation
  731.  
  732. In article <1992Apr8.114827.1815@ghost.dsi.unimi.it>, piovanel@ghost.dsi.unimi.it (marco piovanelli) writes:
  733. >   Now: IM 6 says I should put in the nmIcon field of a NM request record
  734. >   a *HANDLE TO AN ICON FAMILY*.  What does this mean exactly?
  735. >   Should I pass a handle to an ics8 resource, for example?
  736. >   How could the Notification Manager tell a handle to a SICN from a
  737. >   handle to a resource of a different kind?
  738.  
  739. Here's what I've reverse engineered:
  740. An icon family handle is a handle to an array of 10 handles, each of which contains one
  741. of the various icon resources.  (I only know of 6 family members... Maybe Apple's coming out
  742. with 24x24 icons?  icm#'s?) Leave as NIL any members that your family doesn't contain.
  743. Since notification only uses the small icons, only three of the fields are worth filling in.
  744. (Yes, I suppose this might change with a future version of the notification mgr, maybe that
  745. displays a larger icon in the notification dialog, or on systems that have really tall menu
  746. bars).
  747. I don't recall what goes where with the larger icons, but for the ics-'s:
  748.             h[4] = GetResource('ics#', which);
  749.             h[5] = GetResource('ics4', which);
  750.             h[6] = GetResource('ics8', which);
  751. (This is C, with a zero-based array).
  752. Usual disclaimers apply.  Apple probably had some reason for not documenting the icon
  753. family handle to which I am not privy, but this is what works right now.  You probably
  754. shouldn't try this using 6.0.x or in the presence of small children, housepets, or persons
  755. with weak hearts.
  756.  
  757.  
  758. - --
  759. Scott Lindsey <wombat@claris.com>
  760.  
  761. ---------------------------
  762.  
  763. From: ebido@bio.vu.nl (Etienne Bido)
  764. Subject: Appletalk printing problems
  765. Date: 8 Apr 92 19:11:12 GMT
  766. Organization: VU Biology, Amsterdam, The Netherlands
  767.  
  768. We are having problems printing from our Macs to laserprinters over
  769. appletalk. It doesn't matter if the laserprinters are in the same zone
  770. or in a different zone than the Mac. There are several errors that will
  771. be displayed. (randomly?).The most occuring errors are:
  772.  
  773. "Problems with appletalk"    or
  774. "A printing error occured"   or
  775. The mac just beeps and stops the printing      or
  776. A complete system hang-up.       or 
  777.  
  778. a combination of the above.
  779.  
  780. Those errors seem to be completely random, sometimes printing goes
  781. without problems for half an hour. than the errors start, giving 
  782. the different errors randomly.
  783.  
  784. The only thing we can do is keep trying to print because 1 in every 10
  785. times it will go through.
  786.  
  787. Does the mac get influenced by the position of the sun/moon, or the 
  788. winddirection or something? It sometimes looks like it.
  789. - -- 
  790. Etienne Bido            |ebido@bio.vu.nl    
  791. Vrye Universiteit        |bido@chem.vu.nl
  792. Amsterdam
  793. The Netherlands
  794.  
  795. +++++++++++++++++++++++++++
  796.  
  797. From: noah@acs.harding.edu
  798. Date: 9 Apr 92 16:32:04 GMT
  799. Organization: Harding University
  800.  
  801. In article <1992Apr8.191112.15100@bio.vu.nl>, ebido@bio.vu.nl (Etienne Bido) writes:
  802. >We are having problems printing from our Macs to laserprinters over
  803. >appletalk. It doesn't matter if the laserprinters are in the same zone
  804. >or in a different zone than the Mac. There are several errors that will
  805. >be displayed. (randomly?).The most occuring errors are:
  806. >
  807. >"Problems with appletalk"    or
  808. >"A printing error occured"   or
  809. >The mac just beeps and stops the printing      or
  810. >A complete system hang-up.       or 
  811. >
  812. >a combination of the above.
  813. >
  814. >Those errors seem to be completely random, sometimes printing goes
  815. >without problems for half an hour. than the errors start, giving 
  816. >the different errors randomly.
  817. >
  818. >The only thing we can do is keep trying to print because 1 in every 10
  819. >times it will go through.
  820. >
  821. >Does the mac get influenced by the position of the sun/moon, or the 
  822. >winddirection or something? It sometimes looks like it.
  823. >-- 
  824. >Etienne Bido            |ebido@bio.vu.nl    
  825. >Vrye Universiteit        |bido@chem.vu.nl
  826. >Amsterdam
  827. >The Netherlands
  828.  
  829. I am curious. Which version of Apple Share are you using. I know that we had
  830. trouble running Apple share 3.0 and using the *feature* print spooler. We shut
  831. off print spooler in Apple Share  3.0 and remove print monitor from all the
  832. machines in the lab. You might try that. Let me know.
  833. jtn 
  834. e-mail -- noah@acs.harding.edu
  835.  
  836. +++++++++++++++++++++++++++
  837.  
  838. From: cpolishe@isis.cs.du.edu (Chuck Polisher)
  839. Date: 9 Apr 92 21:06:57 GMT
  840. Organization: Nyx, Public Access Unix at U. of Denver Math/CS dept.
  841.  
  842. In article <1992Apr9.113205.482@ualr.edu> noah@acs.harding.edu writes:
  843. >In article <1992Apr8.191112.15100@bio.vu.nl>, ebido@bio.vu.nl (Etienne Bido) writes:
  844. >>We are having problems printing from our Macs to laserprinters over
  845. >>appletalk. It doesn't matter if the laserprinters are in the same zone
  846. >>or in a different zone than the Mac. There are several errors that will
  847. >>be displayed. (randomly?).The most occuring errors are:
  848. >>
  849. >>"Problems with appletalk"    or
  850. >>"A printing error occured"   or
  851. >>The mac just beeps and stops the printing      or
  852. >>A complete system hang-up.       or 
  853. >>
  854. >>a combination of the above.
  855. >>
  856. >>Those errors seem to be completely random, sometimes printing goes
  857. >>without problems for half an hour. than the errors start, giving 
  858. >>the different errors randomly.
  859. >>
  860. >>The only thing we can do is keep trying to print because 1 in every 10
  861. >>times it will go through.
  862. >>
  863. >>Does the mac get influenced by the position of the sun/moon, or the 
  864. >>winddirection or something? It sometimes looks like it.
  865. >>-- 
  866. >>Etienne Bido            |ebido@bio.vu.nl    
  867. >>Vrye Universiteit        |bido@chem.vu.nl
  868. >>Amsterdam
  869. >>The Netherlands
  870. >
  871.  
  872. This looks exactly like a situation I had with a network of 25 macs
  873. with several printers. Trouble was finally diagnosed by polling all
  874. nodes on the net from one end of the backbone. The responses to the
  875. poll can be read out on an oscilloscope. What you look for is marginal
  876. signal amplitude coming back. The "normal" vs troublesome signal
  877. strengths will be visually very clear. Find a bad wire or connection
  878. and repair. The trouble is that Appletalk is a very forgiving protocol
  879. and will tolerate lots of noise without any noticable effects. But
  880. printer packets get lost and ...
  881.  
  882. I also had some success with a 230kHz signal source and a 'scope
  883. to find and fix problems. Usually the net showed about 0.1v drop
  884. from node to node, each node getting "fainter" as the signal source
  885. was moved further from the 'scope. The bad link showed a much higher
  886. drop. 
  887.  
  888. If you are having net problems, this is a pretty good basic check
  889. since it validates the _physical_ network layer (or is that _electrical_,
  890. oh well I'm splitting hairs...). E-mail me if you have questions,
  891. this newsgroup ages off my host pretty quickly and I'm liable to miss
  892. a posted reply. Good Luck!!!!!
  893.  
  894. ---------------------------
  895.  
  896. From: Carl.Constantine@BCSystems.GOV.BC.CA
  897. Subject: Extra QD Text Styles - how??
  898. Date: 8 Apr 92 07:36:46 -700
  899. Organization: BC Systems Corporation
  900.  
  901. Hi once again netters.  While in the process of writting my graphing program, I
  902. was browsing through ResEdit setting up some of my menus.  For my "Styles"
  903. menu, I want to be able to support the standard QD text styles PLUS Double
  904. Underline and Strikethrough!! However, as you may well know, these styles are
  905. not in ResEdit for me to put them in the menu, nor can I find info on how to
  906. implement these styles.  Some Word Processing programs (MS Word, WordPerfect,
  907. etc.) have these in the menu and so do some drawing programs (SuperPaint). 
  908. Does anyone know where I can find info on 1) how do display this in my style
  909. menu (do I have to write my own MDEF [man I hope not, could someone supply with
  910. this if that's what is necessary] ) and 2) how to implement these extra styles
  911. in my program.
  912.  
  913. Thanks in advance...
  914.  
  915. "I am the MacMan"
  916. Carl B. Constantine (Mac Consultant)
  917. Christian Computer Services
  918.  
  919. - -- 
  920. Carl.Constantine@BCSystems.gov.bc.ca
  921. Victoria, British Columbia, Canada
  922.  
  923.  
  924. +++++++++++++++++++++++++++
  925.  
  926. From: zobkiw@world.std.com (Joe Zobkiw)
  927. Date: 9 Apr 92 14:10:56 GMT
  928. Organization: The World Public Access UNIX, Brookline, MA
  929.  
  930. Carl -
  931.  
  932. To support double underline and strike-thru, etc...I think you're going to
  933. need to write an MDEF. See Inside Macintosh for information on writing
  934. such a beast.
  935.  
  936.  
  937. - -- 
  938. <--------------------------------------------------->
  939.  joe zobkiw                     zobkiw@world.std.com
  940.  mac.synthesis.MIDI.development.C.asm.communications
  941. >---------------------------------------------------<
  942.  
  943. ---------------------------
  944.  
  945. From: nancywi@ima.isc.com (Nancy Wilson)
  946. Subject: BalloonWriter
  947. Date: 2 Mar 92 20:48:07 GMT
  948. Organization: Interactive Systems, Cambridge MA
  949.  
  950. I'd like to hear from anyone with experience using this tool-- pros and cons, 
  951.  how it compares to AppMaker, any comments on version 170.1.  I'm a doc person
  952. with a tight deadline for delivering balloon help and I need to make a quick
  953. decision about tools.
  954.   
  955.  
  956.  
  957.  
  958. +++++++++++++++++++++++++++
  959.  
  960. From: kscott@dantzig.scd.ucar.edu (Keith Scott)
  961. Date: 1 Apr 92 20:44:53 GMT
  962. Organization: UCLA School of Engineering and Applied Science
  963.  
  964.  
  965.     Can I use BalloonWriter to add help ballons to applications
  966. written in Think C 5.0.2?  My problem is that, once I get everything
  967. set up and click on the "Set Rect & Tip" button in balloonwriter, it
  968. switches to my application but I don't see the rect and tip.  This
  969. seems to be the case with all Think C programs (including their
  970. standard 'starter' application).  Any suggestions?
  971.  
  972.             Thanks,
  973.  
  974.                 keith@seas.ucla.edu
  975.                 Keith Scott
  976.  
  977. ---------------------------
  978.  
  979. From: bobh@twinkie.bellcore.com
  980. Subject: Playing non-MIDI frequencies
  981. Date: 4 Mar 92 16:05:59 GMT
  982. Organization: Bell Communications Research, Red Bank, New Jersey
  983.  
  984. Help, I feel betrayed.  I want to play some pure sine-waves of frequencies
  985. which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
  986. touch-tone keypad) and I'm having some problems.
  987.  
  988. I figured the way to do this would be to build a pure sine-wave wave table, 
  989. and then start playing the appropriate frequencies on mouse-down and stop
  990. them on mouse-up.  Seemed logical at the time.
  991.  
  992. So, I successfully opened a sound channel to the wave table synth, successfully
  993. loaded in the sine-wave table, and successfully played the notes at the MIDI
  994. frequencies.  But, unfortunately, the touch tone keypad frequencies are not 
  995. MIDI notes, so I need a way to specify the frequency without using a MIDI 
  996. value.  
  997.  
  998. According to IM V, there is a sound manager command "noteCmd" in which you can
  999. specify *either* a MIDI value *or* an actual frequency as well as the 
  1000. amplitude.  But, according to IM VI, the value assigned to "noteCmd" is now 
  1001. used for "freqDurationCmd" and the parameters are now for duration and
  1002. MIDI value *only.*  Can this really be?????  
  1003.  
  1004. This appears to be a completely needless compatibility problem as well as a
  1005. step *back* in Sound Manager functionality.  Why would they do this, and is
  1006. there *any* way now that I can play sine waves at arbitrary frequencies?
  1007.  
  1008. Frustratedly yours,
  1009.  
  1010. - -Bob Hettmansperger  (bobh@maestro.bellcore.com)
  1011.  
  1012. - -------------------------
  1013.  
  1014. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  1015. Date: 4 Mar 92 16:54:13 GMT
  1016. Organization: Kalamazoo College
  1017.  
  1018. bobh@twinkie.bellcore.com () writes:
  1019. >Help, I feel betrayed.  I want to play some pure sine-waves of frequencies
  1020. >which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
  1021. >touch-tone keypad)...
  1022. >
  1023. >According to IM V, there is a sound manager command "noteCmd" in which you can
  1024. >specify *either* a MIDI value *or* an actual frequency as well as the 
  1025. >amplitude.  But, according to IM VI, the value assigned to "noteCmd" is now 
  1026. >used for "freqDurationCmd" and the parameters are now for duration and
  1027. >MIDI value *only.*  Can this really be?????  
  1028. >
  1029. >This appears to be a completely needless compatibility problem as well as a
  1030. >step *back* in Sound Manager functionality.  Why would they do this, and is
  1031. >there *any* way now that I can play sine waves at arbitrary frequencies?
  1032.  
  1033. It's true.  According to a document on AppleLink (which I unfortunately
  1034. don't have here right now), the actual frequency is not supported.
  1035. Actually, if I remember correctly, it never was.
  1036.  
  1037. In any case, your best bet would probably be to create a sampled sine
  1038. wave in a 'snd ' resource of the frequency you need.  I believe
  1039. HyperCard's old phone dialer stack used such sounds.  If you don't want
  1040. to go to the trouble of making up seven sine waves (and playing two at a
  1041. time), you can fudge it by changing the sampleRate value before playing
  1042. the sound--but you didn't hear that from me.
  1043.  
  1044. For example, if your 'snd ' sine wave is sampled at 22 KHz, and is a
  1045. 1000 Hz tone, the sampleRate field will be 0x56EE8BA3 == 22254 Hz.
  1046. Multiply that by 1000/1100 and you get about 0x4F0767A8.  Plug that into
  1047. sampleRate and execute a bufferCmd.  The resulting tone should be about
  1048. 1100 Hz.  If you don't do anything silly like initializing the channel
  1049. with initNoInterp or initNoDrop, the Sound Manager will even interpolate
  1050. for you and make it sound OK.
  1051.  
  1052. But be careful when you write into those structures, don't do it when
  1053. sound is playing, I don't know what would happen.  Like I say, you
  1054. didn't hear this from me...
  1055. - -- 
  1056.  Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
  1057.  Kzoo randomly kills all my mail;  if I don't acknowledge, try resending.    
  1058.  
  1059. - -------------------------
  1060.  
  1061. From: nick@ed.ac.uk (Nick Rothwell)
  1062. Date: 6 Mar 92 12:14:55 GMT
  1063. Organization: Friends of the Salter Duck
  1064.  
  1065. Just to nit-pick here. There's no such thing as "MIDI frequencies."
  1066. MIDI note commands just indicate which keys to gate on a (virtual)
  1067. keyboard. The frequencies emitted by a sound generator might be
  1068. totally unrelated to them.
  1069.  
  1070. Nick.
  1071. - --
  1072. Nick Rothwell, LFCS, Edinburgh |         Tips to confuse a vegetarian #6:
  1073.              nick@dcs.ed.ac.uk |           serve a venus flytrap salad.
  1074. Mentation Consultancy Services |
  1075.    cassiel@cix.compulink.co.uk | ("You mean it's a vegetable but it eats meat?")
  1076.  
  1077. +++++++++++++++++++++++++++
  1078.  
  1079. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  1080. Date: 9 Mar 92 11:02:56 +1300
  1081. Organization: University of Waikato, Hamilton, New Zealand
  1082.  
  1083. In article <1992Mar4.160559.24912@walter.bellcore.com>,
  1084. bobh@twinkie.bellcore.com () complains that freqDurationCmd (nee noteCmd)
  1085. does not let you specify frequencies other than those corresponding to
  1086. integral MIDI note numbers.
  1087.  
  1088. It's true, this is a nuisance, but it is possible to get around it,
  1089. by using rateCmd instead of freqDurationCmd.
  1090.  
  1091. First of all, turn off the sound volume on the channel by doing an ampCmd
  1092. with an amplitude of zero. Next, start an infinite-duration sound playing at
  1093. some arbitrary pitch with freqCmd. Then, change the note to the right
  1094. frequency with rateCmd. Finally, make the sound audible with another ampCmd
  1095. with a nonzero amplitude.
  1096.  
  1097. This is off the top of my head--the code I wrote that did this is at home.
  1098. Then, of course, you need to figure out a way to cut the note after the
  1099. right duration. I didn't have this problem, as I was playing a note for
  1100. as long as the mouse button was down.
  1101.  
  1102. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  1103. Computer Services Dept                     fax: +64-7-838-4066
  1104. University of Waikato            electric mail: ldo@waikato.ac.nz
  1105. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  1106.  
  1107. +++++++++++++++++++++++++++
  1108.  
  1109. From: potts@itl.itd.umich.edu (Paul Potts)
  1110. Date: 27 Mar 92 13:52:58 GMT
  1111. Organization: Instructional Technology Laboratory, University of Michigan
  1112.  
  1113. In article <1992Mar4.160559.24912@walter.bellcore.com> bobh@twinkie.bellcore.com () writes:
  1114. >Help, I feel betrayed.  I want to play some pure sine-waves of frequencies
  1115. >which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
  1116. >touch-tone keypad) and I'm having some problems.
  1117.  
  1118. Sound Manager won't do this - you can only play notes or samples at the
  1119. MIDI note numbers. For playing sine waves, the thing to do is probably to
  1120. build a wave table at your frequency and play it at a standard rate.
  1121. Apparently the math for playing arbitrary notes at arbitrary frequencies is
  1122. very hairy and would be too taxing to play in real time.
  1123.  
  1124. For the telephone touch-pad, you might be better off sampling the pitches 
  1125. that a real phone creates and playing back the samples.
  1126. - -- 
  1127.          -Paul Potts-potts@itl.itd.umich.edu- 
  1128. "The amounts of nicotine that are tolerated by adult smokers can produce
  1129. symptoms of poisoning and could prove fatal if Habitrol systems are applied
  1130. or ingested by children or pets." - Habitrol(TM) drug ad, information sheet.
  1131.  
  1132. +++++++++++++++++++++++++++
  1133.  
  1134. From: markl@netcom.com (Mark Lentczner)
  1135. Date: 28 Mar 92 01:24:48 GMT
  1136. Organization: Netcom - Online Communication Services  (408 241-9760 guest)
  1137.  
  1138. potts@itl.itd.umich.edu (Paul Potts) writes:
  1139.  
  1140. >In article <1992Mar4.160559.24912@walter.bellcore.com> bobh@twinkie.bellcore.com () writes:
  1141. >>Help, I feel betrayed.  I want to play some pure sine-waves of frequencies
  1142. >>which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
  1143. >>touch-tone keypad) and I'm having some problems.
  1144.  
  1145. >Sound Manager won't do this - you can only play notes or samples at the
  1146. >MIDI note numbers. For playing sine waves, the thing to do is probably to
  1147. >build a wave table at your frequency and play it at a standard rate.
  1148. >Apparently the math for playing arbitrary notes at arbitrary frequencies is
  1149. >very hairy and would be too taxing to play in real time.
  1150.  
  1151. Well, I don't work for Apple (anymore), so don't take this as gospel,
  1152. (but I did design and write the first version of the Sound Manager :-) )...
  1153.  
  1154. Yup, you can play ANY frequency you want!  Instead of specifiy the
  1155. midi note number in param2 (the long param in a SndCommand) you specify
  1156. a fixed point frequency (16.16 bits, i.e.: 442.5 Hz is $016A 8000).
  1157.  
  1158. Realize that for touch-tones (DTMFs) you really have to play two tones
  1159. at once.  (Sorry if that was obvious...)
  1160.  
  1161. - -mark lentczner
  1162.  markl@netcom.com
  1163.  
  1164. +++++++++++++++++++++++++++
  1165.  
  1166. From: potts@itl.itd.umich.edu (Paul Potts)
  1167. Date: 27 Mar 92 13:52:58 GMT
  1168. Organization: Instructional Technology Laboratory, University of Michigan
  1169.  
  1170. In article <1992Mar4.160559.24912@walter.bellcore.com> bobh@twinkie.bellcore.com () writes:
  1171. >Help, I feel betrayed.  I want to play some pure sine-waves of frequencies
  1172. >which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
  1173. >touch-tone keypad) and I'm having some problems.
  1174.  
  1175. Sound Manager won't do this - you can only play notes or samples at the
  1176. MIDI note numbers. For playing sine waves, the thing to do is probably to
  1177. build a wave table at your frequency and play it at a standard rate.
  1178. Apparently the math for playing arbitrary notes at arbitrary frequencies is
  1179. very hairy and would be too taxing to play in real time.
  1180.  
  1181. For the telephone touch-pad, you might be better off sampling the pitches 
  1182. that a real phone creates and playing back the samples.
  1183. - -- 
  1184.          -Paul Potts-potts@itl.itd.umich.edu- 
  1185. "The amounts of nicotine that are tolerated by adult smokers can produce
  1186. symptoms of poisoning and could prove fatal if Habitrol systems are applied
  1187. or ingested by children or pets." - Habitrol(TM) drug ad, information sheet.
  1188.  
  1189. +++++++++++++++++++++++++++
  1190.  
  1191. From: markl@netcom.com (Mark Lentczner)
  1192. Date: 28 Mar 92 01:24:48 GMT
  1193. Organization: Netcom - Online Communication Services  (408 241-9760 guest)
  1194.  
  1195. potts@itl.itd.umich.edu (Paul Potts) writes:
  1196.  
  1197. >In article <1992Mar4.160559.24912@walter.bellcore.com> bobh@twinkie.bellcore.com () writes:
  1198. >>Help, I feel betrayed.  I want to play some pure sine-waves of frequencies
  1199. >>which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
  1200. >>touch-tone keypad) and I'm having some problems.
  1201.  
  1202. >Sound Manager won't do this - you can only play notes or samples at the
  1203. >MIDI note numbers. For playing sine waves, the thing to do is probably to
  1204. >build a wave table at your frequency and play it at a standard rate.
  1205. >Apparently the math for playing arbitrary notes at arbitrary frequencies is
  1206. >very hairy and would be too taxing to play in real time.
  1207.  
  1208. Well, I don't work for Apple (anymore), so don't take this as gospel,
  1209. (but I did design and write the first version of the Sound Manager :-) )...
  1210.  
  1211. Yup, you can play ANY frequency you want!  Instead of specifiy the
  1212. midi note number in param2 (the long param in a SndCommand) you specify
  1213. a fixed point frequency (16.16 bits, i.e.: 442.5 Hz is $016A 8000).
  1214.  
  1215. Realize that for touch-tones (DTMFs) you really have to play two tones
  1216. at once.  (Sorry if that was obvious...)
  1217.  
  1218. - -mark lentczner
  1219.  markl@netcom.com
  1220.  
  1221. +++++++++++++++++++++++++++
  1222.  
  1223. From: potts@itl.itd.umich.edu (Paul Potts)
  1224. Organization: Instructional Technology Laboratory, University of Michigan
  1225. Date: Sun, 29 Mar 92 23:35:45 GMT
  1226.  
  1227. In article <ylcjvkdmarkl@netcom.com> markl@netcom.com (Mark Lentczner) writes:
  1228. >potts@itl.itd.umich.edu (Paul Potts) writes:
  1229. >
  1230. >>In article <1992Mar4.160559.24912@walter.bellcore.com> bobh@twinkie.bellcore.com () writes:
  1231. >>>Help, I feel betrayed.  I want to play some pure sine-waves of frequencies
  1232. >>>which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
  1233. >>>touch-tone keypad) and I'm having some problems.
  1234. >
  1235. >>Sound Manager won't do this - you can only play notes or samples at the
  1236. >>MIDI note numbers. For playing sine waves, the thing to do is probably to
  1237. >>build a wave table at your frequency and play it at a standard rate.
  1238. >>Apparently the math for playing arbitrary notes at arbitrary frequencies is
  1239. >>very hairy and would be too taxing to play in real time.
  1240. >
  1241. >Well, I don't work for Apple (anymore), so don't take this as gospel,
  1242. >(but I did design and write the first version of the Sound Manager :-) )...
  1243.  
  1244. With all due respect to Mark, this is definitely incorrect in systems
  1245. older than (I'm guessing) 6.0.4. Try passing a value in param 2 and watch
  1246. the sound manager code. The bits get stripped off and only the low 7 get
  1247. examined. The sound manager then does some odd math (it looks odd because
  1248. I'm sure it is optimized to do fixed-point without SANE). It only responds
  1249. properly to values 1..128. Values 128..256 map back to lower notes. Larger
  1250. values produce strange results.
  1251.  
  1252. >Yup, you can play ANY frequency you want!  Instead of specifiy the
  1253. >midi note number in param2 (the long param in a SndCommand) you specify
  1254. >a fixed point frequency (16.16 bits, i.e.: 442.5 Hz is $016A 8000).
  1255. >
  1256. >Realize that for touch-tones (DTMFs) you really have to play two tones
  1257. >at once.  (Sorry if that was obvious...)
  1258.  
  1259. This is why it would probably be better to sample the tones - it might be
  1260. touchy to get the two sine waves synchronized to produce just the right
  1261. beat frequencies.
  1262. >
  1263.  
  1264. >-mark lentczner
  1265. > markl@netcom.com
  1266.  
  1267.  
  1268. - -- 
  1269. Paul Potts - potts@itl.itd.umich.edu
  1270. Un damne' descendant sans lampe,
  1271. Au bord d'un gouffre dont l'odeur
  1272. Trahit l'humide profondeur,
  1273.  
  1274. +++++++++++++++++++++++++++
  1275.  
  1276. From: cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton)
  1277. Date: 30 Mar 1992 17:00:42 GMT
  1278. Organization: UTHSCH Academic Computing
  1279.  
  1280. In article <1992Mar27.135258.11955@terminator.cc.umich.edu>, potts@itl.itd.umich.edu (Paul Potts) writes:
  1281. > In article <1992Mar4.160559.24912@walter.bellcore.com> bobh@twinkie.bellcore.com () writes:
  1282. > >Help, I feel betrayed.  I want to play some pure sine-waves of frequencies
  1283. > >which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
  1284. > >touch-tone keypad) and I'm having some problems.
  1285.  
  1286. This is a Pascal unit I wrote a LONG time ago to play touch tones out the Mac's
  1287. speaker. I make no claims about its correctness, and it definitely uses the
  1288. OLD Sound Manager. (This unit is part of a XCMD...)
  1289.  
  1290. Chuck
  1291. - -----------------
  1292. unit TouchTones;
  1293. interface
  1294.  uses
  1295.   Sane;
  1296.  
  1297.  const
  1298.   ttIllegalTone = -1;  (*invalid character passed for touch tone*)
  1299.   ttBadVolume = -2; (*volume not between 0-7*)
  1300.   ttSndErr = -3; (*sound driver had an error*)
  1301.   ttMemErr = -4; (*some sort of memory allocation error happened*)
  1302.  
  1303.  
  1304. (********************)
  1305.  
  1306.  function TouchTone (tone: char;
  1307.      dur, vol: integer): OSErr;
  1308. (* Play touch tone 0-9,A-D,*,#. *)
  1309.  
  1310. implementation
  1311.  
  1312.  
  1313. (********************)
  1314.  
  1315.  function TouchTone (tone: char;
  1316.      dur, vol: integer): OSErr;
  1317.   var
  1318.    oldVol: integer;
  1319.    fts: FTSynthRec;
  1320.    fsnd: ftSoundRec;
  1321.    myWave: Wave;
  1322.    freqX, freqY: integer;
  1323.  
  1324. (********************)
  1325.  
  1326.   procedure MakeWave;
  1327.    var
  1328.     i: integer;
  1329.     f, pi: extended;
  1330.   begin
  1331.    pi := arcTan(1) * 4;
  1332.    f := 2 * pi / 256;
  1333.    for i := 0 to 255 do begin
  1334.     myWave[i] := round(sin(i * f) * 120 + 128);
  1335.    end;
  1336.   end;
  1337.  
  1338. (********************)
  1339.  
  1340.   function FreqToRate (freq: integer): Fixed;
  1341.    const
  1342.     ratio = 11.778130028;
  1343.   begin
  1344.    FreqToRate := FixRatio(round(freq * ratio), 1024);
  1345.   end;
  1346. (********************)
  1347.  
  1348.  begin
  1349.   if not (vol in [0..7]) then
  1350.    TouchTone := ttBadVolume
  1351.   else if not (tone in ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'a', 'b', 'c', 'd', '*', '#']) then
  1352.    TouchTone := ttIllegalTone
  1353.   else begin
  1354.  
  1355.    MakeWave;
  1356.    case tone of
  1357.     '1', '2', '3', 'A', 'a': 
  1358.      freqY := 697;
  1359.     '4', '5', '6', 'B', 'b': 
  1360.      freqY := 770;
  1361.     '7', '8', '9', 'C', 'c': 
  1362.      freqY := 852;
  1363.     '*', '0', '#', 'D', 'd': 
  1364.      freqY := 941;
  1365.    end;
  1366.    case tone of
  1367.     '1', '4', '7', '*': 
  1368.      freqX := 1209;
  1369.     '2', '5', '8', '0': 
  1370.      freqX := 1336;
  1371.     '3', '6', '9', '#': 
  1372.      freqX := 1477;
  1373.     'A', 'B', 'C', 'D', 'a', 'b', 'c', 'd': 
  1374.      freqX := 1633;
  1375.    end;
  1376.    with fts do begin
  1377.     mode := ftMode;
  1378.     sndRec := @fsnd;
  1379.     with fsnd do begin
  1380.      duration := dur;
  1381.      sound1Rate := FreqToRate(freqX);
  1382.      sound1Phase := 1;
  1383.      sound2Rate := FreqToRate(freqY);
  1384.      sound2Phase := 1;
  1385.      sound3Rate := 0;
  1386.      sound3Phase := 1;
  1387.      sound4Rate := 0;
  1388.      sound4Phase := 1;
  1389.      sound1Wave := @myWave;
  1390.      sound2Wave := @myWave;
  1391.      sound3Wave := nil;
  1392.      sound4Wave := nil;
  1393.     end;
  1394.    end;
  1395.    GetSoundVol(oldVol);
  1396.    SetSoundVol(vol);
  1397.    StartSound(@fts, sizeof(FTSynthRec), nil);
  1398.    repeat
  1399.    until SoundDone;
  1400.    StopSound;
  1401.    SetSoundVol(oldVol);
  1402.    TouchTone := noErr;
  1403.   end;
  1404.  end;
  1405.  
  1406. end.
  1407.  
  1408. +++++++++++++++++++++++++++
  1409.  
  1410. From: REEKES@applelink.apple.com (Jim Reekes)
  1411. Date: 9 Apr 92 20:10:43 GMT
  1412. Organization: Apple Computer, Inc.
  1413.  
  1414. In article <6293@lib.tmc.edu>, cshotton@oac.hsc.uth.tmc.edu (Chuck Shotton) writes:
  1415. > In article <1992Mar27.135258.11955@terminator.cc.umich.edu>, potts@itl.itd.umich.edu (Paul Potts) writes:
  1416. > > 
  1417. > > In article <1992Mar4.160559.24912@walter.bellcore.com> bobh@twinkie.bellcore.com () writes:
  1418. > > >Help, I feel betrayed.  I want to play some pure sine-waves of frequencies
  1419. > > >which are not "standard" MIDI frequencies (I'm trying to simulate a telephone
  1420. > > >touch-tone keypad) and I'm having some problems.
  1421. > > 
  1422. > This is a Pascal unit I wrote a LONG time ago to play touch tones out the Mac's
  1423. > speaker. I make no claims about its correctness, and it definitely uses the
  1424. > OLD Sound Manager. (This unit is part of a XCMD...)
  1425. > Chuck
  1426. >
  1427. > lots 'o code followed...
  1428.  
  1429.  
  1430. There's an easier method.  Get the 'snd ' resources out of HyperCard 2.0 or
  1431. later.  It contains samples of the actual telephone frequencies.  You knew
  1432. that HyperCard supported the "DIAL" command didn't you?  Well it does,
  1433. and it does it using a simple method.
  1434.  
  1435. So, ya wanna do dial tones just like HyperCard? Well, that's not so hard (as
  1436. long as you are patient enough to read through all the Sound Manager documents
  1437. and beat your head against the wall for half an hour, like I did). The
  1438. technique is simple: lift the 'snd ' resources from HyperCard and use them to
  1439. generate dial tones! (Yes, that's OK, dtmf tones are generic sounds; just
  1440. don't lift any of the other sounds!)
  1441.  
  1442. Start by using ResEdit to copy 'snd ' resources #130-145 from the HyperCard
  1443. program file (I got them out of 2.0). Next use the Sound Manager to play them
  1444. and to use them as an instrument definition for the samplesynth. Since this
  1445. can be tricky, and since you may or may not want dive deep into the Sound
  1446. Manager, I am including a generic subroutine that I wrote that will "dial" for
  1447. you. All I ask is that if you use it "as is" in your application, please
  1448. remember me in your prayers.
  1449.  
  1450. How to use the dial procedure:
  1451.  
  1452. To call the dial procedure simply pass it a string and it will do the rest.
  1453. All digits A thru D, # and * play the proper tone for the touch tone key; any
  1454. other characters generate a 1/2 second delay. Each tone is sounded for about
  1455. 1/4 second. The interface to it is simply: Procedure Dial(theNum:Str255).
  1456. Please note that in order to keep this short, very little error checking has
  1457. been added, please add any/all that you need.
  1458.  
  1459. And now for the fabulous source code:
  1460.  
  1461. PROCEDURE Dial(theNum: Str255);
  1462.  
  1463. VAR
  1464.     i                  : Integer;
  1465.     theSound           : Handle;
  1466.     theResNum          : Integer;
  1467.     dummy              : LongInt;
  1468.     err                : OSErr;
  1469.     chan               : SndChannelPtr;
  1470.     cmd                : SndCommand;
  1471.  
  1472. BEGIN
  1473.     IF Length(theNum) = 0 THEN
  1474.         Exit(Dial);
  1475.  
  1476.     chan := NIL;        {allocate a channel}
  1477.     err := SndNewChannel(chan, sampledSynth, 0, NIL);
  1478.     IF err <> noErr
  1479.         Exit(Dial);
  1480.  
  1481.     FOR i := 1 TO Length(theNum) DO BEGIN
  1482.  
  1483.         CASE theNum[i] OF
  1484.             '0'..'9': theResNum := ord(theNum[i]) - ord('0') + 130;
  1485.             'A'..'D': theResNum := ord(theNum[i]) - ord('A') + 140;
  1486.             '*': theResNum := 144;
  1487.             '#': theResNum := 145;
  1488.             OTHERWISE theResNum := 0;
  1489.         END;
  1490.  
  1491.         IF theResNum <> 0 THEN BEGIN
  1492.             {Load the proper sound resource}
  1493.             theSound := GetResource('snd ', theResNum);
  1494.             HLock(theSound);
  1495.  
  1496.             {See sound manager docs for resource format of}
  1497.             {type 2 sounds for more info}
  1498.             cmd.cmd := soundCmd;
  1499.             cmd.param1 := 0;
  1500.             
  1501.             {This next line ASSUMES it was a format 2 'snd ' resource}
  1502.             {This will not work for other 'snd ' resources}
  1503.             cmd.param2 := ORD4(theSound^) + 14;
  1504.             err := SndDoImmediate(chan, cmd);
  1505.  
  1506.             {Now send the freqDurationCmd to play a middle C}
  1507.             {that's how the instrument was defined in HyperCard}
  1508.             cmd.cmd := freqDurationCmd;                     
  1509.             cmd.Param1 := 4000;                 {2 seconds in duration}
  1510.             cmd.Param2 := $FF000000 + 60;       {Loud + Middle c}
  1511.             err := SndDoImmediate(chan, cmd);
  1512.  
  1513.         END ELSE
  1514.             Delay(30, dummy);   {all nonDTMF characters produce a delay...}
  1515.     END;
  1516.     err := SndDisposeChannel(chan, false);
  1517.     HUnlock(theSound);
  1518. END;
  1519.  
  1520.  
  1521. - -----------------------------------------------------------------------
  1522. Jim Reekes, E.O.             |     Macintosh Toolbox Engineering
  1523.                              |          Sound Manager Expert
  1524. Apple Computer, Inc.         | "All opinions expressed are mine, and do
  1525. 20525 Mariani Ave. MS: 81-KS |   not necessarily represent those of my
  1526. Cupertino, CA 95014          |       employer, Apple Computer Inc."
  1527.  
  1528. ---------------------------
  1529.  
  1530. End of C.S.M.P. Digest
  1531. **********************
  1532.